home *** CD-ROM | disk | FTP | other *** search
Java Source | 2003-04-29 | 656 b | 29 lines |
- package com.jproxy.samples.ejb.test;
-
- import javax.ejb.*;
- import java.rmi.RemoteException;
-
- import com.jproxy.samples.interfaces.ITest;
-
- public class Test
- extends Base
- implements ITest
- {
- public long getServerTime()
- throws RemoteException
- {
- // System.out.println("TestSessionBean: CallerPrincipal:"+context.getCallerPrincipal());
- long time = System.currentTimeMillis();
- System.out.println(new java.util.Date(time));
- return time;
- }
-
- public byte[] echoBytes(byte[] bytes)
- throws RemoteException
- {
- if(bytes==null)
- throw new RemoteException("RemoteException test: wrong parameter: null");
- return bytes;
- }
- }
-